home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / borland / svgabg52.zip / NOTES_S3.SVG < prev    next >
Text File  |  1993-09-11  |  3KB  |  85 lines

  1. SuperVGA S3 BGI driver 
  2. Version 1.5
  3. August 28, 1993
  4.  
  5. Revisions:
  6.     1.1 - May 20, 1993
  7.     1.05 - January 28, 1993
  8.     1.0 - June 28, 1992
  9.  
  10. This is the latest version of my SuperVGA S3 BGI driver.  All functions
  11. have been implemented, but there may still be bugs.
  12.  
  13.     o Apparently there is a problem with using putimage at addresses >64k
  14.     (The driver will put up a solid block instead of the image)
  15.  
  16. Note:  Palette functions, and the mouse cursor will not work with this driver.
  17.        Paging is not yet implemented
  18.  
  19.   Using the driver in the 256 and 16 color modes is similar to using the
  20.   standard SuperVGA 256 and 16 color drivers.  See the files NOTES[256|16].SVG
  21.  
  22.   Using the S3 driver in 32768 color mode:
  23.  
  24.     Implementing the 32768 color driver involved several hacks, as
  25.     the BGI interface only supports 8-bit color values, but the driver
  26.     needed support for 15-bit color values.  The procedures that needed
  27.     to be changed were those that accepted color values, (SetColor,
  28.     SetFillStyle, SetFillPattern, PutPixel and Floodfill)  and those 
  29.     that return color values (GetColor and GetPixel).
  30.     As the HiColor modes do not support palettes, I decided to use
  31.     the SetRgbPalette call to set colors, as it accepts values for the 
  32.     R,G and B components of the color.
  33.  
  34.     The format of a pixel in the HiColor modes is:
  35.         -Byte 1- -Byte 0-
  36.         xRRRRRGG GGGBBBBB
  37.  
  38.     Several new functions are defined to make the color selection easier.
  39.     In addition, the macro RGB(rv,gv,bv) has been defined.  It packs
  40.     the R, G and B values into the format described above and returns the
  41.     combined color.
  42.  
  43.     * RealDrawColor(); - Sets the current drawing color.
  44.       Usage:
  45.         setcolor(RealDrawColor(RGB(rval,gval,bval)); - HiColor modes
  46.         setcolor(RealDrawColor(cval)); - (suggested for any other driver)
  47.  
  48.     * RealFillColor(); - Sets the current fill color.
  49.       Usage:
  50.         setfillstyle(fillstyle,RealFillColor(RGB(rval,gval,bval)));
  51.         setfillstyle(fillstyle,RealFillColor(cval));
  52.         setfillpattern(fillpat,RealFillColor(RGB(rval,gval,bval)));
  53.         setfillpattern(fillpat,RealFillColor(cval));
  54.  
  55.     * RealColor(); - For putpixel, sets the color of the pixel
  56.                - For floodfill, sets the color of the boundary
  57.         putpixel(x,y,RealColor(RGB(rval,gval,bval)));
  58.         putpixel(x,y,RealColor(cval));
  59.         floodfill(x,y,RealColor(RGB(rval,gval,bval)));
  60.         floodfill(x,y,RealColor(cval));
  61.  
  62.     * GetPixel normally only returns an 8-bit value.  However, the
  63.       value returned from the BGI driver is a 16-bit value in DX (the 
  64.       BGI kernel loads the value into AX and clears the upper 8 bits),
  65.       so to read the value of a pixel:
  66.  
  67.       In Pascal:
  68.         Color := getpixel(x,y);
  69.         inline($89/$56/<Color);  (* Loads 15-bit color value *)
  70.  
  71.       In C:
  72.         Color = getpixel(x,y);
  73.         Color = _DX;
  74.       
  75.     o Mouse code hooks added (1.05)
  76.  
  77.     o Fixed text clipping at right and bottom edges (1.1)
  78.  
  79.     o Added compile-time support for 8x8, 8x14, or 8x16 bitmap fonts (1.1)
  80.  
  81.     o Fixed detection so it should work with newer S3 cards (1.1)
  82.  
  83.     o Drivers now have compile-time support for BGI version 3.0.
  84.       Supports protected mode with Borland Pascal 7.0 (1.5)
  85.